package com.koron.system.datadict.controller;

import com.koron.bean.base.Response;
import com.koron.common.core.business.datadict.service.SysDataDictClassifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.koron.ebs.mybatis.ADOConnection;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 系统管理-数据字典分类{@code SysDataDictClassify}控制层
 *
 * <p>主要提供：查询功能</p>
 *
 * @author 朱超
 * @since 2021-08-26
 */
@RestController
@RequestMapping("sys/DataDictClassify")
@Api(tags = "系统管理-数据字典分类接口")
public class SysDataDictClassifyController {
    private final SysDataDictClassifyService sysDataDictClassifyService;
    public SysDataDictClassifyController(SysDataDictClassifyService sysDataDictClassifyService) {
        this.sysDataDictClassifyService = sysDataDictClassifyService;
    }

    /**
     * 将数据字典分类的数据（s_dictionary_classify表）中的数据查询出来
     *
     * @return Response对象:返回的数据存储在data字段中
     * @see Response
     * @version 1.0
     */
    @GetMapping("getDictionaryClassifyList")
    @ApiOperation(value = "仅数据字典分类的所有数据，不包含下属的数据字典及详情")
    public Response getDictionaryClassifyList() {
        return ADOConnection.runTask(sysDataDictClassifyService,"getDictionaryClassifyList",Response.class);
    }
}